class Person():
	# 限定Person对象只能绑定__name,__age属性
	__slots__ = ('__name','__age')
	def __init__(self,name,age):
		self.__name = name
		self.__age = age

	@property
	def name(self):
		return self._name
	
	@property
	def age(self):
		return self._age
	
	@age.setter
	def age(self,age):
		self.__age = age

	def play(self):
		if self.__age <=16:
			print('%s正在玩飞行棋.' % self.__name)
		else:
			print('%s正在玩斗地主.' % self.__name)

if __name__ == '__main__':
	person = Person('王大锤', 12)
	person.play()
	person.age = 22
	person.play()
	# person.name = '白元芳'
	# person._is_gray = True